﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using ActivityTracker;
using Expression.Blend.SampleData.ScheduleTypesDataSource;

namespace ActivityTracker
{
    public partial class ScheduleTypes : PhoneApplicationPage
    {
        #region Constructor

        public ScheduleTypes()
        {
            InitializeComponent();
        }

        #endregion

        #region page events

        private void ListBoxSchedules_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (ListBoxSchedules.SelectedIndex != -1)
            {
                App.schedId = ((e.AddedItems[0] as Item).SchedId).ToString();
                App.schedName = ((e.AddedItems[0] as Item).SchedName).ToString();
                NavigationService.Navigate(new Uri("/Views/Schedules/AddNewSchedule.xaml", UriKind.Relative));
            }
        }

        #endregion
    }
}